<template>
  <tl-sub-page :render="render" :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close">
    <div>
      <component :is="subPage" ref="subPage" render="div" :projectcode="this.projectcode"></component>
    </div>
  </tl-sub-page>
</template>
<script>
/** mixins */
/** 子组件 */
import { mixin_approval_edit } from '@tapui/mixins/mixin_approval_edit'
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_approval_edit],
  components: {},
  data() {
    return {
      moduleTitle: '项目风险',
      subPage: 'div',
      visible: false
    }
  },
  props: {
    /** 项目号 */
    projectcode: {
      type: String,
      default: '31312'
    },
    /** 界面路径 */
    handleform: {
      type: String,
      default: 'pm/cbbPmRisk/index'
    }
  },

  methods: {
    loadData() {
      const page = () => import('@/views/' + this.handleform)
      this.subPage = page
    },
    open() {
      this.subPage = 'div'
      this.loadData()
    }
  }
}
</script>
